import VxeUI from "vxe-pc-ui";

class MessageUtils {

    /**
     * 显示错误的消息
     *
     * @param {string} message - 要显示的消息
     */
    public static showErrorMessage(message: string) {
        VxeUI.modal.message({
            content: message,
            status: 'error'
        }).then(() => {
        });
    }

    /**
     * 显示成功的消息
     *
     * @param {string} message - 要显示的消息
     */
    public static showSuccessMessage(message: string) {
        VxeUI.modal.message({
            content: message,
            status: 'success'
        }).then(() => {
        });
    }

    /**
     * 显示普通的消息
     *
     * @param {string} message - 要显示的消息
     */
    public static showInfoMessage(message: string) {
        VxeUI.modal.message({
            content: message,
            status: 'info'
        }).then(() => {
        });
    }
}

export default MessageUtils;
